<extend name="Public/base"/>

<block name="body">
    <script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
    <div class="main-title">
        <h2>
            <if condition="ACTION_NAME eq 'add'">
                新增战队
            <else/>
                编辑战队
            </if>
            <button class="btn btn-default btn-return" onclick="javascript:history.back(-1);return false;"><i class="glyphicon glyphicon-share-alt"></i> 返 回</button>
        </h2>
    </div>
    <form action="" method="post" class="form">
        <div class="form-item form-group">
            <label class="item-label">名称<span class="check-tips"></span></label>
            <div class="controls">
                <input type="text" class="text form-control input-small" name="name" value="{$name}">
            </div>
        </div>
        <div class="form-item form-group">
            <label class="item-label">显示名称<span class="check-tips"></span></label>
            <div class="controls">
                <input type="text" class="text form-control input-large" name="full_name" value="{$full_name}">
            </div>
        </div>
        <div class="form-item form-group">
            <label class="item-label">游戏<span class="check-tips"></span></label>
            <div class="controls">
                <select name="game_id">
                    <option value="">--请选择--</option>
                    <volist name="games" id="game">
                        <option value="{$game.id}" <eq name="game['id']" value="$game_id"> selected</eq>>
                            {$game.name}
                        </option>
                    </volist>
                </select>
            </div>
        </div>
        <div class="form-item form-group cf">
            <label class="item-label">LOGO<span class="check-tips">(400*400px png)</span></label>
            <div class="controls">
                <div class="controls">
                    <input type="file" id="upload_picture_logo">
                    <input type="hidden" name="logo" id="cover_id_logo" value="{$logo}" />
                    <div class="upload-img-box">
                        <notempty name="logo">
                        <div class="upload-pre-item"><img src="{:url_format($logo)}"/></div>
                        </notempty>
                    </div>
                </div>
                {:hook('adminPicUpload', array('id'=>"upload_picture_logo",'return'=>"cover_id_logo", 'type' => 'path'))}                                                              
            </div>
        </div>
        <div class="form-item form-group">
            <label class="item-label">描述<span class="check-tips"></span></label>
            <div class="controls">
                <label class="input-large">
                    <textarea class="form-control" rows="4" name="detail">{$detail}</textarea>
                </label>
            </div>
        </div>
        <div class="form-item form-group">
            <label class="item-label">状态<span class="check-tips"></span></label>
            <label class="radio-inline">
            <input type="radio" name="status" <if condition="$status eq 1 or $status eq ''">checked</if> value="1"  /> 开启
            </label>
            <label class="radio-inline">
            <input type="radio" name="status" <eq name="status" value="0">checked</eq> value="0"  />关闭
            </label>
        </div>
        <div class="form-item form-group form-action">
            <input type="hidden" name="id" value="{$id}" />
            <button class="btn submit-btn ajax-post btn-success btn-block" id="submit" type="submit" target-form="form">确 定</button>
            <!-- <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button> -->
        </div>
    </form>
</block>

<block name="script">
    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U('Team/index')}');
    </script>
</block>
